<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="{{=T.accepted_language or 'en'}}">

    <head>
        <title>PhyloGrafter Home</title>

        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

        {{include 'web2py_ajax.html'}}

        <script type="text/javascript" src="{{=URL(request.application,'static','raphael.js')}}"></script>
        <script type="text/javascript" src="{{=URL(request.application,'static','ajaxupload.js')}}"></script>
        <script type="text/javascript" src="{{=URL(request.application,'static','jquery-ui-1.8.2.custom.min.js')}}"></script>
        <script type="text/javascript" src="{{=URL(request.application,'static','jquery.corners.js')}}"></script>
        <script type="text/javascript" src="{{=URL(request.application,'static','utility.js')}}"></script>
        <script type="text/javascript" src="{{=URL(request.application,'static','shadowbox.js')}}"></script>
        <script type="text/javascript" src="{{=URL(request.application,'static','indexAjax.js')}}"></script>
        <script type="text/javascript" src="{{=URL(request.application,'static','indexShadowbox.js')}}"></script>
        <script type="text/javascript" src="{{=URL(request.application,'static','indexGlobals.js')}}"></script>
        <script type="text/javascript" src="{{=URL(request.application,'static','indexConfig.js')}}"></script>
        <script type="text/javascript" src="{{=URL(request.application,'static','indexUtil.js')}}"></script>
        <script type="text/javascript" src="{{=URL(request.application,'static','treeUtil.js')}}"></script>
        <script type="text/javascript" src="{{=URL(request.application,'static','optionsMenu.js')}}"></script>
        
        {{if auth.has_membership('sourceTreeAdders', auth.user_id, None ):}}
            <script type="text/javascript" src="{{=URL(request.application,'static','addSourceTree.js')}}"></script>
            <script type="text/javascript" src="{{=URL(request.application,'static','sourceTreeAnnotation.js')}}"></script>
        {{pass}}

        {{if auth.has_membership('grafters', auth.user_id, None ):}}
            <script type="text/javascript" src="{{=URL(request.application,'static','grafting.js')}}"></script>
        {{pass}}

        <link rel="stylesheet" media="screen,projection" type="text/css" href="{{=URL(request.application,'static','shadowbox.css')}}" />
        <link rel="stylesheet" media="screen,projection" type="text/css" href="{{=URL(request.application,'static','jquery-ui-1.8.1.custom.css')}}" />
        <link rel="stylesheet" media="screen,projection" type="text/css" href="{{=URL(request.application,'static','custom.css')}}" />
    </head>

    <!-- oncontextmenu return false disables default right click -->
    <body oncontextmenu="return false;">

        <div id="leftPanel" class="scrollable fLeft width25 height98 blackBorder">

            <div id="leftPanelHeader" class="center blackBorder">Source Trees</div>

            <div id="sourceTreeInfoContainer"></div>

        </div>

        <div id="mainPanel" class="scrollable fLeft width74 height98 blackBorder">
        
            <!-- div that contains the entire svg visualization, it usually extends past its parent, but is hidden -->
            <div id="raphaelContainer"></div>

        </div>

        <div class="clear">

        <script type="text/javascript" charset="utf-8">
            
            //initialize shadowbox (lightbox)          
            Shadowbox.init( { enableKeys: false, modal: true } );

            globals.applicationName = '{{=request.application}}';
            globals.scrollBarWidth = getScrollBarWidth();

            $('#mainPanel').mouseup( handleMainPanelClick );
            $('#leftPanel').mouseup( handleLeftPanelClick );

            {{for tree in sourceTrees:}}
                
                $('#sourceTreeInfoContainer').append( createSourceTreeItem( { 'id': '{{=tree["id"]}}', 'name': '{{=tree["name"]}}', 'creationDate': '{{=tree["creationDate"]}}' } ) );

            {{pass}}

            $(document).ready( documentReady );
    
        </script>

      </body>

</html>

              
